package com.eshop.modules.system.service.mapper;

import org.apache.ibatis.annotations.Select;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import com.eshop.modules.system.domain.DictDetail;
import com.eshop.common.mapper.CoreMapper;

@Repository
public interface DictDetailMapper extends CoreMapper<DictDetail>
{
    @Select({ "<script>SELECT d.* from dict_detail d LEFT JOIN dict t on d.dict_id = t.id where 1=1 <if test = \"label !=null\" > and d.label LIKE concat('%', #{label}, '%') </if> <if test = \"dictName != ''||dictName !=null\" > AND t.name = #{dictName} order by t.sort asc</if></script>" })
    List<DictDetail> selectDictDetailList(@Param("label") final String label, @Param("dictName") final String dictName);
}
